<?php
/**
 * 群组表模型
 */
namespace app\msgapi\model;

class GroupChat extends BaseModel
{

   /* public function setUseridsAttr($value)
    {
        return implode(',', $value);
    }*/

    public function setMemberListAttr($value)
    {
        return json_encode($value, 256);
    }

    public function userowner()
    {
        return $this->hasOne(User::class, 'userid', 'owner')->bind(['ownername' => 'name']);
    }
}